#ifndef ORDERSTABLE_H
#define ORDERSTABLE_H

#include <QTableWidget>
#include <QMenu>
#include <QAction>

class OrdersTableWidget : public QTableWidget
{
    Q_OBJECT
public:
    enum ORDERSTYPE { ORDERSCURR, ORDERSHIST };
    OrdersTableWidget(ORDERSTYPE type, QWidget *parent = 0);
    void init(const QStringList &strList);

public slots:
    void slotCloseOrder();
    void slotCloseAllOrders();
    void slotClearHistOrders();

protected:
    virtual void keyPressEvent(QKeyEvent *event);
    virtual void mousePressEvent(QMouseEvent *event);
    ORDERSTYPE m_type;
    QMenu *m_tableMenu;
    QAction *m_closeOrderAction;
    QAction *m_closeAllOrdersAction;
    QAction *m_clearHistOrderAction;
};

#endif